package com.sddfp.client.access.fallback;

import com.sddfp.client.access.TradeLogApi;
import com.sddfp.common.pojo.*;
import com.sddfp.common.result.Result;
import org.springframework.stereotype.Component;

@Component
public class TradeLogApiFallback implements TradeLogApi {
    // 当远程调用出现异常时候，这里做降级处理
    @Override
    public SignatureDto proxyBindCardLog(BankCardAddDTO bankCardAddDTO) {
        // 降级业务：返回空
        SignatureDto signatureDTO = new SignatureDto();
        signatureDTO.setReqCode("降级处理");
        signatureDTO.setBankUrl("https://www.sddfp.com");
        signatureDTO.setPlatformNo("中国银行");
        signatureDTO.setReqData("服务器繁忙，请稍后重试666");
        return signatureDTO;
    }

    @Override
    public String showPort() {
        return " xxxxxx";
    }

    @Override
    public Result syncBorrowRecord(BorrowSyncRecordVo borrowSyncRecordVo) {
        return Result.fail("消费降级");
    }


    @Override
    public Result<BidBalanceDTO> getBidBalance(String userCode) {
        return Result.fail("消费降级");

    }

    @Override
    public Result<String> bankBidService(BankBidDTO bankBidDTO) {
        return Result.fail("消费降级");

    }
}